<html lang="zh-cn">
<head>
{% include "tdm_include_head_template.html" %}

<script type="text/javascript">
$(function() {
  sidebar_nav_clone();
  //$('.collapse').collapse('hide');
  $("input[type=text]").keypress(function(e) {
    if (e.keyCode == 13) { //回车事件
      $("input#log_search").click();
      //return false;
    }
  });
});
</script>

</head>

<body class=" theme-blue">
{% include "tdm_include_navbar_template.html" %}

<div class="container">
  <br/>
  {% include "tdm_include_error_template.html" %}

  <form name="server_log_form" action="/tdm/log/" method="get">
  <div class="table-responsive">
  <table class="table table-hover">
    <tr><th>时间</th><th>类型</th><th>城市</th><th>教学点</th><th>设备</th><th>项目</th><th>内容</th></tr>
    <tr>
      <td><input type="text" placeholder="2014/12/3 9:20" name="req_time" class="form-control"></td>
      <td><input type="text" placeholder="acard" name="req_module" class="form-control"></td>
      <td><input type="text" placeholder="北京" name="req_city" class="form-control"></td>
      <td><input type="text" placeholder="和盛大厦" name="req_venue" class="form-control"></td>
      <td><input type="text" placeholder="" name="req_dev" class="form-control"></td>
      <td><input type="text" placeholder="" name="req_item" class="form-control"></td>
      <td>&nbsp;</td>
    </tr>
    {% for ser_log in ser_log_list %}
    <tr>
      <td><script>sec2time("{{ser_log.tm.isoformat}}", 'M/d hh:mm');</script></td>
      <td>{{ser_log.module.name}}</td>
      <td>{{ser_log.city.name}}</td>
      <td>{{ser_log.venue.name}}</td>
      <td>{{ser_log.dev}}</td>
      <td>{{ser_log.item}}</td>
      <td>{{ser_log.content}}</td>
    </tr>
    {% endfor %}
    {% if ser_log_list|length_is:"0" %}
    <tr><td colspan="7" align="center">无日志</td></tr>
    {% endif %}
  </table>
  </div>
  <div class="row">
    <div class="col-md-10 col-lg-10 col-xs-12">
      <nav>
        <ul class="pagination">
          <li class="disabled"><a href="#">共{{ser_log_len}}条</a></li>
          <!--<li><a href="#">&laquo;</a></li>-->
          {% for pg_nr in ser_log_page_list %}
          <li {% ifequal pg_nr ser_log_pg_start %}class="active"{% endifequal %}>
            <a href="/tdm/log?log_start={{pg_nr}}{{req_search}}">{{pg_nr}}</a>
            <!--<a href="/tdm/log?log_start={{pg_nr}}">{{pg_nr}}</a>-->
          </li>
          {% endfor %}
          <!-- <li><a href="#">&raquo;</a></li> -->
        </ul>
      </nav>
    </div>
    <div class="col-md-2 col-lg-2 col-xs-12">
      <button name="op" id="log_search" value="log_search" type="submit" class="btn btn-hidden">筛选</button>
      <button name="op" id="log_refresh" value="log_refresh" type="submit" class="btn btn-primary">刷新</button>
      <button name="op" id="log_del" value="log_del" type="submit" class="btn btn-primary">清除</button>
    </div>
  </div>
  </form>

  {% include "tdm_include_footer_template.html" %}
</div>
</body>
</html>
